<?
include_once ("includes.php");

function getHeader()
{
	$t = $t."<head>";
		$t = $t."<title>Football Draft</title>";
		$t = $t."<script type='text/javascript' src='jquery.js'></script>";
		$t = $t."<link rel='stylesheet' href='twitter-bootstrap-0f11410/bootstrap-1.1.0.css'/>";
		$t = $t."<link href='draftstyle.css' rel='stylesheet' type='text/css' />";
	$t = $t."</head>";
	
	return $t;
}

function getToolbar($draft, $ie, $isActive)
{
	$t = "<div class='topbar'>";
		$t = $t."<div class='fill'>";
			$t = $t."<div class='container'>";
				$t = $t."<h3 class='topbar-name'><a href='#'>".$draft->name."</a></h3>";
				$t = $t."<ul>";
					if ($isActive == 1)
					{
						$t = $t."<li class='active topbar-link'><a href='draftpage.php'>Draft</a></li>";
						$t = $t."<li class='topbar-link'><a href='teampage.php'>My Team</a></li>";
						$t = $t."<li class='topbar-link'><a href='draftstatspage.php'>History</a></li>";
					}
					else if ($isActive == 2)
					{
						$t = $t."<li class='topbar-link'><a href='draftpage.php'>Draft</a></li>";
						$t = $t."<li class='active topbar-link'><a href='teampage.php'>My Team</a></li>";
						$t = $t."<li class='topbar-link'><a href='draftstatspage.php'>History</a></li>";
					}
					else if ($isActive == 3)
					{
						$t = $t."<li class='topbar-link'><a href='draftpage.php'>Draft</a></li>";
						$t = $t."<li class='topbar-link'><a href='teampage.php'>My Team</a></li>";
						$t = $t."<li class='active topbar-link'><a href='draftstatspage.php'>History</a></li>";
					}
					else
					{
						$t = $t."<li class='topbar-link'><a href='draftpage.php'>Draft</a></li>";
						$t = $t."<li class='topbar-link'><a href='teampage.php'>My Team</a></li>";
						$t = $t."<li class='topbar-link'><a href='draftstatspage.php'>History</a></li>";
					}
					$t = $t."<li class='topbar-link'><a href='logout.php'>Log Out</a></li>";
				$t = $t."</ul>";
			$t = $t."</div>";
		$t = $t."</div>";
	$t = $t."</div>";
	if (!$ie)
	{
		$t = $t."<div class='under-topbar'>Thank you for not using Internet Explorer</div>";
	}
	return $t;
}

function getClockMessage($teamOnClock)
{
	if ($_SESSION['team']->equals($teamOnClock))
	{
		$t = "<div class='alert-message success'>";
			$t = $t."<p class='clock'>Make A Selection!</p>";
		$t = $t."</div>";
	}
	else
	{
		$t = "<div class='alert-message error'>";
			$t = $t."<p class='clock'>".$teamOnClock." is picking</p>";
		$t = $t."</div>";
	}  
	return $t;
}

function getNavBar($draft)
{
	$selectRepo = new SelectionRepo();
	$selections = $selectRepo->getRecentSelections(5, $draft->id);
	$t = "<div class='sidebar'>";
	$t = $t."<div class='page-header'><h2>Draft Stats </h2></div>";
	$t = $t."<h3>Round: ".$draft->currentRound."</h3>";
	$t = $t."<h3>Pick: ".$draft->currentPick."</h3>";
	$t = $t."<br/>";
	$t = $t."<div class='page-header'><h2>Latest Picks</h2></div>";
	$t = $t."<table>";
	if (count($selections) > 0 )
	{
		foreach ($selections as $s)
		{
			$t = $t.$s->getDisplayView();;
		}
	}
	$t = $t."</table></div>";
	return $t;
}

?>